package com.cn.dim.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.dim.dao.ChktaskDao;
import com.cn.dim.pojo.Chktask;
import com.cn.dim.pojo.Filepath;
import com.cn.dim.service.ChktaskService;
import com.github.pagehelper.PageHelper;
@Service("chktaskService")
public class ChktaskServiceImpl implements ChktaskService{
	@Resource
	ChktaskDao chktaskDao;
	@Override
	public List<Map<String, Object>> queryChktask(Map<String, Object> m) {//根据查询条件查询巡查任务列表，列表的每一行以键值对的形式提现；
		// TODO Auto-generated method stub
		PageHelper.startPage(Integer.valueOf(m.get("pageIndex").toString()),Integer.valueOf(m.get("pageSize").toString()),true);
		return chktaskDao.queryChktask(m);
	}
	public List<Map<String, Object>> queryChktasklist(Map<String, Object> m) {//根据查询条件查询巡查任务列表，列表的每一行以键值对的形式提现；
		// TODO Auto-generated method stub
		return chktaskDao.queryChktasklist(m);
	}
	@Override
	public List<Map<String,Object>> queryChkpoint(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return chktaskDao.queryChkpoint(m);
	}
	@Override
	public int insertChktask(Chktask ct,List<Map<String,Object>> ct_photourls) {
		// TODO Auto-generated method stub
		chktaskDao.insertChktask(ct);
		return chktaskDao.insertFilepath(ct_photourls);
	}
	@Override
	public int updateChktask(Chktask ct) {
		// TODO Auto-generated method stub
		return chktaskDao.updateChktask(ct);
	}
	@Override
	public int delChktask(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return chktaskDao.delChktask(m);
	}
	@Override
	public Chktask queryChktaskById(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return chktaskDao.queryChktaskById(m);
	}
	@Override
	public List<Filepath> queryFilepath(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return chktaskDao.queryFilepath(m);
	}
	@Override
	public List<Map<String, Object>> queryChktaskExcel(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return chktaskDao.queryChktaskExcel(m);
	}
	@Override
	public int insertchktask(Map<String, Object> param) {
		// TODO Auto-generated method stub
		return chktaskDao.insertchktask(param);
	}
	@Override
	public int insertfilelist(List<Map<String, Object>> param) {
		// TODO Auto-generated method stub
		return chktaskDao.insertfilelist(param);
	}
	@Override
	public List<Map<String, Object>> queryChktaskdetail(Map<String, Object> param) {
		// TODO Auto-generated method stub
		return chktaskDao.queryChktaskdetail(param);
	}
	@Override
	public List<Map<String, Object>> queryfiles(Map<String, Object> param) {
		// TODO Auto-generated method stub
		return chktaskDao.queryfiles(param);
	}
}
